package com.acegear.horizon.domain.events;

/**
 * Created by wangsike on 2016/12/21.
 */
public class UserLoginEvent extends BaseEvent {

  private Long userId;
  private LoginType type;

  public UserLoginEvent() {

  }

  public UserLoginEvent(Long userId, LoginType type) {
    this.userId = userId;
    this.type = type;
    genEventId();
  }

  public Long getUserId() {
    return userId;
  }

  public void setUserId(Long userId) {
    this.userId = userId;
  }

  public LoginType getType() {
    return type;
  }

  public void setType(LoginType type) {
    this.type = type;
  }

  @Override
  public String routingKey() {
    return "horizon.domain.user.login";
  }

  public enum LoginType {
    PHONE, EMAIL, PASSWORD, WEIBO, WECHAT, MANAGEMENT
  }
}
